API Documentation
Public Member Functions | List of all members
nkWinUi::ThemeManager Class Referencefinal

Manages the themes within the component. More...

Inheritance diagram for nkWinUi::ThemeManager:

Public Member Functions

ThemeaddTheme (const char *name)
 
void setActiveTheme (Theme *theme)
 
ThemegetTheme (const char *name) const
 
ThemegetActiveTheme () const
 

Detailed Description

Manages the themes within the component.

A Manager is always responsible for the resources allocated using it.

Member Function Documentation

◆ addTheme()

Theme* nkWinUi::ThemeManager::addTheme ( const char *  name)

Declares a theme.

Parameters
nameThe name to attach to the theme.
Returns
The theme created. The manager owns the allocated memory.

◆ setActiveTheme()

void nkWinUi::ThemeManager::setActiveTheme ( Theme theme)

Sets the active theme to use within the component.

Parameters
themeThe theme to use when drawing the windows in the component.

◆ getTheme()

Theme* nkWinUi::ThemeManager::getTheme ( const char *  name) const

Request for a theme attached to a name.

Parameters
nameThe name of the theme wanted.
Returns
The Theme attached to the name if available, nullptr otherwise.

◆ getActiveTheme()

Theme* nkWinUi::ThemeManager::getActiveTheme ( ) const
Returns
The theme currently active.

The documentation for this class was generated from the following file: